<html>
    <head>
		<script runat='server'> // DO NOT REMOVE: needed for the Jaxer unit testing harness 
			Jaxer.load(Jaxer.request.parsedUrl.queryParts.testHarnessHeader);
		</script>	
        <script type="text/javascript" runat="server">
      		function test_Serialization_EmptyObject()
			{
				var data = {};
				var expected = "{}";
				var result = Jaxer.Serialization.toJSONString(data, {as: Jaxer.Serialization.NATIVE_JSON_METHOD});
				
				assertEquals(result, expected);
			}
			
			function test_Serialization_ObjectOfBooleans()
			{
				var data = { a: true, b: false };
				var expected = '{"a":true,"b":false}';
				var result = Jaxer.Serialization.toJSONString(data, {as: Jaxer.Serialization.NATIVE_JSON_METHOD});
				
				assertEquals(result, expected);
			}
			
			function test_Serialization_ObjectOfNumbers()
			{
				var data = { a: 10, b: -10, c: 10.5, d: -10.5, e: 1.05e50, f: -1.05e50, g: 1.05e-50, h: -1.05e-50 };
				var expected = '{"a":10,"b":-10,"c":10.5,"d":-10.5,"e":1.05e+50,"f":-1.05e+50,"g":1.05e-50,"h":-1.05e-50}';
				var result = Jaxer.Serialization.toJSONString(data, {as: Jaxer.Serialization.NATIVE_JSON_METHOD});
				
				assertEquals(result, expected);
			}
						
			function test_Serialization_ObjectOfStrings()
			{
				var data = { a: "hello", b: "world" };
				var expected = '{"a":"hello","b":"world"}';
				var result = Jaxer.Serialization.toJSONString(data, {as: Jaxer.Serialization.NATIVE_JSON_METHOD});
				
				assertEquals(result, expected);
			}
			
			function test_Deserialization_EmptyObject()
			{
				var json = "{}";
				var expected = {};
				var result = Jaxer.Serialization.fromJSONString(json, {as: Jaxer.Serialization.NATIVE_JSON_METHOD});
				
				assertEquals(result.toString(), expected.toString());
			}
        </script>
    </head>
    <body>
    </body>
</html>